import Vue from "vue";
import config from "@/config";
Vue.mixin({
  data() {
    return {
      StatusBar: this.StatusBar,
      CustomBar: this.CustomBar
    };
  },
  // onLoad 只会在页面执行,组件不执行
  onLoad() {
    // end ---- 初始化tarbar
    typeof this.__init === "function" && this.__init();
  },
  computed: {
    STATE() {
      return this.$store.state;
    },
    // 兼容之前的版本
    state() {
      return this.$store.state;
    },
    RESOURCES_URL(){
      return config.RESOURCES_URL;
    }
  },
  methods: {
    go(url) {
      uni.navigateTo({
        url: url
      });
    }
  }
});
